package com.wzh.designmode.create.singleton;
/**
 * 这是最基本的 单例实现模式
 * @author wzh
 *
 */
public class SingleObject {

	//创建一个对象
	private static SingleObject singleObject=new SingleObject();
	
	//让构造函数为 private  防止 外面实例化
	private SingleObject(){}
	
	//获取唯一对象
	public static SingleObject getInit(){
		return singleObject;
	}
	
	public void sayHello(){
		System.out.println("Hello");
	}
}
